home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / DriverGestalt.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  20.0 KB  |  418 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        DriverGestalt.a
  3. ;
  4. ;    Contains:    Driver Gestalt interfaces
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__DRIVERGESTALT__') = 'UNDEFINED' THEN
  18. __DRIVERGESTALT__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  24.     include 'OSUtils.a'
  25.     ENDIF
  26.     IF &TYPE('__SCSI__') = 'UNDEFINED' THEN
  27.     include 'SCSI.a'
  28.     ENDIF
  29.  
  30. ; __________________________________________________________________________________
  31. ;  The Driver Gestalt bit in the dCtlFlags 
  32.  
  33. kbDriverGestaltEnable            EQU        2
  34. kmDriverGestaltEnableMask        EQU        $04
  35. ; __________________________________________________________________________________
  36. ;  Driver Gestalt related csCodes 
  37.  
  38. kDriverGestaltCode                EQU        43                    ; various uses 
  39. kDriverConfigureCode            EQU        43                    ; various uses 
  40. kdgLowPowerMode                    EQU        70                    ; Sets/Returns the current energy consumption level 
  41. kdgReturnDeviceID                EQU        120                    ; returns SCSI DevID in csParam[0] 
  42. kdgGetCDDeviceInfo                EQU        121                    ; returns CDDeviceCharacteristics in csParam[0] 
  43. ; __________________________________________________________________________________
  44. ;  Driver Gestalt selectors 
  45.  
  46. kdgVersion                        EQU        'vers'                ; Version number of the driver in standard Apple format 
  47. kdgDeviceType                    EQU        'devt'                ; The type of device the driver is driving. 
  48. kdgInterface                    EQU        'intf'                ; The underlying interface that the driver is using (if any) 
  49. kdgSync                            EQU        'sync'                ; True if driver only behaves synchronously. 
  50. kdgBoot                            EQU        'boot'                ; value to place in PRAM for this drive (long) 
  51. kdgWide                            EQU        'wide'                ; True if driver supports ioWPosOffset 
  52. kdgPurge                        EQU        'purg'                ; Driver purge permission (True = purge; False = no purge) 
  53. kdgSupportsSwitching            EQU        'lpwr'                ; True if driver supports power switching 
  54. kdgMin3VPower                    EQU        'pmn3'                ; Minimum 3.3V power consumption in microWatts 
  55. kdgMin5VPower                    EQU        'pmn5'                ; Minimum 5V power consumption in microWatts 
  56. kdgMax3VPower                    EQU        'pmx3'                ; Maximum 3.3V power consumption in microWatts 
  57. kdgMax5VPower                    EQU        'pmx5'                ; Maximum 5V power consumption in microWatts 
  58. kdgInHighPower                    EQU        'psta'                ; True if device is currently in high power mode 
  59. kdgSupportsPowerCtl                EQU        'psup'                ; True if driver supports following five calls 
  60. kdgAPI                            EQU        'dAPI'                ; API support for PC Exchange 
  61. kdgEject                        EQU        'ejec'                ; Eject options for shutdown/restart (Shutdown Mgr) 
  62. kdgFlush                        EQU        'flus'                ; Determine if disk driver supports flush and if it needs a flush 
  63. kdgVMOptions                    EQU        'vmop'                ; Disk drive's Virtual Memory options 
  64. kdgMediaInfo                    EQU        'minf'                ; return media specific information 
  65. kdgPhysDriveIconSuite            EQU        'dics'                ; Return a pointer to a IconFamily ('icns') data structure for 
  66.                                                             ; Disk Driver physical drive (formerly in csCode 22) in driverGestaltResponse. 
  67. kdgMediaIconSuite                EQU        'mics'                ; Return a pointer to a IconFamily ('icns') data structure for 
  68.                                                             ; Disk Driver media (formerly in csCode 21) in driverGestaltResponse. 
  69.                                                             ; See IconServices.r for information detailing the 'icns' resource data format 
  70. kdgMediaName                    EQU        'mnam'                ; Return a pointer to a pascal string describing the Disk Driver (formerly in csCode 21) in driverGestaltResponse. 
  71. ; __________________________________________________________________________________
  72. ;  Driver Configure selectors 
  73.  
  74. kdcFlush                        EQU        'flus'                ; Tell a disk driver to flush its cache and any hardware caches 
  75. kdcVMOptions                    EQU        'vmop'                ; Change the disk driver's Virtual Memory options 
  76. ; __________________________________________________________________________________
  77. ;  control parameter block for Driver Configure calls 
  78. DriverConfigParam        RECORD 0
  79. qLink                     ds.l    1                ; offset: $0 (0)
  80. qType                     ds.w    1                ; offset: $4 (4)
  81. ioTrap                     ds.w    1                ; offset: $6 (6)
  82. ioCmdAddr                 ds.l    1                ; offset: $8 (8)
  83. ioCompletion             ds.l    1                ; offset: $C (12)
  84. ioResult                 ds.w    1                ; offset: $10 (16)
  85. ioNamePtr                 ds.l    1                ; offset: $12 (18)
  86. ioVRefNum                 ds.w    1                ; offset: $16 (22)
  87. ioCRefNum                 ds.w    1                ; offset: $18 (24)        ;  refNum for I/O operation 
  88. csCode                     ds.w    1                ; offset: $1A (26)        ;  == kDriverConfigureCode 
  89. driverConfigureSelector     ds.l    1                ; offset: $1C (28)
  90. driverConfigureParameter  ds.l    1                ; offset: $20 (32)
  91. sizeof                     EQU *                    ; size:   $24 (36)
  92.                         ENDR
  93. ; __________________________________________________________________________________
  94. ;  status parameter block for Driver Gestalt calls 
  95. DriverGestaltParam        RECORD 0
  96. qLink                     ds.l    1                ; offset: $0 (0)
  97. qType                     ds.w    1                ; offset: $4 (4)
  98. ioTrap                     ds.w    1                ; offset: $6 (6)
  99. ioCmdAddr                 ds.l    1                ; offset: $8 (8)
  100. ioCompletion             ds.l    1                ; offset: $C (12)
  101. ioResult                 ds.w    1                ; offset: $10 (16)
  102. ioNamePtr                 ds.l    1                ; offset: $12 (18)
  103. ioVRefNum                 ds.w    1                ; offset: $16 (22)
  104. ioCRefNum                 ds.w    1                ; offset: $18 (24)        ;  refNum for I/O operation 
  105. csCode                     ds.w    1                ; offset: $1A (26)        ;     == kDriverGestaltCode 
  106. driverGestaltSelector     ds.l    1                ; offset: $1C (28)        ;  'sync', 'vers', etc. 
  107. driverGestaltResponse     ds.l    1                ; offset: $20 (32)        ;  Could be a pointer, bit field or other format 
  108. driverGestaltResponse1     ds.l    1                ; offset: $24 (36)        ;  Could be a pointer, bit field or other format 
  109. driverGestaltResponse2     ds.l    1                ; offset: $28 (40)        ;  Could be a pointer, bit field or other format 
  110. driverGestaltResponse3     ds.l    1                ; offset: $2C (44)        ;  Could be a pointer, bit field or other format 
  111. driverGestaltfiller         ds.w    1                ; offset: $30 (48)        ;  To pad out to the size of a controlPB 
  112. sizeof                     EQU *                    ; size:   $32 (50)
  113.                         ENDR
  114. ;  Note that the various response definitions are overlays of the response fields above.
  115. ;   For instance the deviceType response would be returned in driverGestaltResponse.
  116. ;   The DriverGestaltPurgeResponse would be in driverGestaltResponse and driverGestaltResponse1
  117. ;
  118.  
  119. ; __________________________________________________________________________________
  120. ;  Device Types response 
  121. DriverGestaltDevTResponse RECORD 0
  122. deviceType                 ds.l    1                ; offset: $0 (0)
  123. sizeof                     EQU *                    ; size:   $4 (4)
  124.                         ENDR
  125.  
  126. kdgDiskType                        EQU        'disk'                ; standard r/w disk drive 
  127. kdgTapeType                        EQU        'tape'                ; tape drive 
  128. kdgPrinterType                    EQU        'prnt'                ; printer 
  129. kdgProcessorType                EQU        'proc'                ; processor 
  130. kdgWormType                        EQU        'worm'                ; write-once 
  131. kdgCDType                        EQU        'cdrm'                ; cd-rom drive 
  132. kdgFloppyType                    EQU        'flop'                ; floppy disk drive 
  133. kdgScannerType                    EQU        'scan'                ; scanner 
  134. kdgFileType                        EQU        'file'                ; Logical Partition type based on a file (Drive Container) 
  135. kdgRemovableType                EQU        'rdsk'                ; A removable media hard disk drive ie. Syquest, Bernioulli 
  136. ; __________________________________________________________________________________
  137. ;  Device Interfaces response 
  138. DriverGestaltIntfResponse RECORD 0
  139. interfaceType             ds.l    1                ; offset: $0 (0)
  140. sizeof                     EQU *                    ; size:   $4 (4)
  141.                         ENDR
  142.  
  143. kdgScsiIntf                        EQU        'scsi'
  144. kdgPcmciaIntf                    EQU        'pcmc'
  145. kdgATAIntf                        EQU        'ata '
  146. kdgFireWireIntf                    EQU        'fire'
  147. kdgExtBus                        EQU        'card'
  148. ; __________________________________________________________________________________
  149. ;  Power Saving 
  150. DriverGestaltPowerResponse RECORD 0
  151. powerValue                 ds.l    1                ; offset: $0 (0)        ;  Power consumed in µWatts 
  152. sizeof                     EQU *                    ; size:   $4 (4)
  153.                         ENDR
  154. ; __________________________________________________________________________________
  155. ;  Disk Specific 
  156. DriverGestaltSyncResponse RECORD 0
  157. behavesSynchronously     ds.b    1                ; offset: $0 (0)
  158. pad                         ds.b    3                ; offset: $1 (1)
  159. sizeof                     EQU *                    ; size:   $4 (4)
  160.                         ENDR
  161. DriverGestaltBootResponse RECORD 0
  162. extDev                     ds.b    1                ; offset: $0 (0)        ;   Packed target (upper 5 bits) LUN (lower 3 bits) 
  163. partition                 ds.b    1                ; offset: $1 (1)        ;   Unused 
  164. SIMSlot                     ds.b    1                ; offset: $2 (2)        ;   Slot 
  165. SIMsRSRC                 ds.b    1                ; offset: $3 (3)        ;   sRsrcID 
  166. sizeof                     EQU *                    ; size:   $4 (4)
  167.                         ENDR
  168. DriverGestaltAPIResponse RECORD 0
  169. partitionCmds             ds.w    1                ; offset: $0 (0)        ;  if bit 0 is nonzero, supports partition control and status calls 
  170. ;          prohibitMounting (control, kProhibitMounting) 
  171. ;          partitionToVRef (status, kGetPartitionStatus) 
  172. ;          getPartitionInfo (status, kGetPartInfo) 
  173. unused1                     ds.w    1                ; offset: $2 (2)        ;  all the unused fields should be zero 
  174. unused2                     ds.w    1                ; offset: $4 (4)
  175. unused3                     ds.w    1                ; offset: $6 (6)
  176. unused4                     ds.w    1                ; offset: $8 (8)
  177. unused5                     ds.w    1                ; offset: $A (10)
  178. unused6                     ds.w    1                ; offset: $C (12)
  179. unused7                     ds.w    1                ; offset: $E (14)
  180. unused8                     ds.w    1                ; offset: $10 (16)
  181. unused9                     ds.w    1                ; offset: $12 (18)
  182. unused10                 ds.w    1                ; offset: $14 (20)
  183. sizeof                     EQU *                    ; size:   $16 (22)
  184.                         ENDR
  185. DriverGestaltFlushResponse RECORD 0
  186. canFlush                 ds.b    1                ; offset: $0 (0)        ;  Return true if driver supports the 
  187. ;  kdcFlush Driver Configure _Control call 
  188. needsFlush                 ds.b    1                ; offset: $1 (1)        ;  Return true if driver/device has data cached 
  189. ;  and needs to be flushed when the disk volume 
  190. ;  is flushed by the File Manager 
  191. pad                         ds.b    2                ; offset: $2 (2)
  192. sizeof                     EQU *                    ; size:   $4 (4)
  193.                         ENDR
  194. ;  Flags for purge permissions 
  195.  
  196. kbCloseOk                        EQU        0                    ; Ok to call Close 
  197. kbRemoveOk                        EQU        1                    ; Ok to call RemoveDrvr 
  198. kbPurgeOk                        EQU        2                    ; Ok to call DisposePtr 
  199. kmNoCloseNoPurge                EQU        0
  200. kmOkCloseNoPurge                EQU        $03
  201. kmOkCloseOkPurge                EQU        $07
  202. ;  Driver purge permission structure 
  203. DriverGestaltPurgeResponse RECORD 0
  204. purgePermission             ds.w    1                ; offset: $0 (0)        ;  0 = Do not change the state of the driver 
  205. ;  3 = Do Close() and DrvrRemove() this driver 
  206. ;  but don't deallocate driver code 
  207. ;  7 = Do Close(), DrvrRemove(), and DisposePtr() 
  208. purgeReserved             ds.w    1                ; offset: $2 (2)
  209. purgeDriverPointer         ds.l    1                ; offset: $4 (4)        ;  pointer to the start of the driver block (valid 
  210. ;  only of DisposePtr permission is given 
  211. sizeof                     EQU *                    ; size:   $8 (8)
  212.                         ENDR
  213. DriverGestaltEjectResponse RECORD 0
  214. ejectFeatures             ds.l    1                ; offset: $0 (0)        ;   
  215. sizeof                     EQU *                    ; size:   $4 (4)
  216.                         ENDR
  217. ;  Flags for Ejection Features field 
  218.  
  219. kRestartDontEject                EQU        0                    ; Dont Want eject during Restart 
  220. kShutDownDontEject                EQU        1                    ; Dont Want eject during Shutdown 
  221. kRestartDontEject_Mask            EQU        $01
  222. kShutDownDontEject_Mask            EQU        $02
  223. ;    The DriverGestaltVMOptionsResponse is returned by a disk driver in response to a
  224. ;    kdgVMOptions Driver Gestalt request. This allows a disk driver to tell VM a few
  225. ;    things about a disk drive. For example:
  226. ;    
  227. ;    • A drive that should never be in the page fault path should return kAllowVMNoneMask.
  228. ;      Examples of this are drives that have manual eject buttons that are not disabled by
  229. ;      software, drives with very slow throughput, or drives that depend on
  230. ;      a network connection.
  231. ;    • A drive that should never be written to but is safe for read-only file mapping
  232. ;      should return kAllowVMReadOnlyMask. Examples of this are WORM drives where each write
  233. ;      eats write-once space on the disk and CD-ROM drives which are read-only media.
  234. ;    • A drive that should allow VM to create its main backing store file should return
  235. ;      kAllowVMReadWriteMask. Examples of this are fast read/write drives that don't allow
  236. ;      manual eject and don't use a network connection.
  237. ;    
  238. ;    A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
  239. ;    what disk drive this call is for. This is a per-drive call, not a per-driver call.
  240. ;    
  241. ;    The only three valid responses to kdgVMOptions at this time are kAllowVMNoneMask,
  242. ;    kAllowVMReadOnlyMask, and kAllowVMReadWriteMask (i.e., setting only kAllowVMWriteBit
  243. ;    is not valid).
  244. ;    
  245. ;    Important: All bits not defined here are reserved and should be set to zero until
  246. ;    they are defined for a specific purpose.
  247. ;    
  248. ;    The kdcVMOptions Driver Configure _Control call provides the ability to change a driver's
  249. ;    response to kdgVMOptions Driver Gestalt requests. A driver should return controlErr if
  250. ;    it doesn't want to provide the ability to change the kdgVMOptions response. If a driver
  251. ;    supports the kdcVMOptions Driver Configure _Control call, but is asked to set an option bit
  252. ;    that it doesn't support (for example, if a read-only device is asked to set the kAllowVMWriteBit),
  253. ;    it should return paramErr.
  254. ;
  255.  
  256. DriverGestaltVMOptionsResponse RECORD 0
  257. vmOptions                 ds.l    1                ; offset: $0 (0)
  258. sizeof                     EQU *                    ; size:   $4 (4)
  259.                         ENDR
  260. ;  Bits and masks for DriverGestaltVMOptionsResponse.vmOptions field 
  261.  
  262. kAllowVMReadBit                    EQU        0                    ; Allow VM to use this drive for read access 
  263. kAllowVMWriteBit                EQU        1                    ; Allow VM to use this drive for write access 
  264. kAllowVMNoneMask                EQU        0
  265. kAllowVMReadOnlyMask            EQU        $01
  266. kAllowVMReadWriteMask            EQU        $03
  267. ;    The DriverGestaltMediaInfoResponse is returned by a disk driver in response to a
  268. ;    kdgMediaInfo DriverGestalt request. This allows a disk driver to tell callers the
  269. ;    physical block size, the number of blocks that are of that size, and the media type
  270. ;    for a given device.
  271. ;    
  272. ;    A disk driver must look at the ioVRefNum field of the DriverGestaltParam to determine
  273. ;    what disk drive this call is for. This is a per-drive call, not a per-driver call.
  274. ;    
  275. ;    On drives that support ejectable media, the response can change depending on what
  276. ;    media is currently in the drive.
  277. ;
  278.  
  279. DriverGestaltMediaInfoResponse RECORD 0
  280. numberBlocks             ds.l    1                ; offset: $0 (0)        ;  number of blocks 
  281. blockSize                 ds.l    1                ; offset: $4 (4)        ;  physical size of blocks 
  282. mediaType                 ds.w    1                ; offset: $8 (8)        ;  media type identifier 
  283. sizeof                     EQU *                    ; size:   $A (10)
  284.                         ENDR
  285. ;  DriverGestaltMediaInfoResponse.mediaType constants 
  286.  
  287. kMediaTypeUnknown                EQU        128                    ; media type is unknown 
  288. kMediaTypeCDROM                    EQU        129                    ; media type is a CD-ROM 
  289. kMediaTypeDVDROM                EQU        130                    ; media type is a DVD-ROM 
  290. kMediaTypeNoMedia                EQU        -1                    ; no media is present 
  291. ; __________________________________________________________________________________
  292. ;  CD-ROM Specific 
  293. ;  The CDDeviceCharacteristics result is returned in csParam[0] and csParam[1] of a 
  294. ;   standard CntrlParam parameter block called with csCode kdgGetCDDeviceInfo.
  295. ;
  296.  
  297. CDDeviceCharacteristics    RECORD 0
  298. speedMajor                 ds.b    1                ; offset: $0 (0)        ;  High byte of fixed point number containing drive speed 
  299. speedMinor                 ds.b    1                ; offset: $1 (1)        ;  Low byte of "" CD 300 == 2.2, CD_SC == 1.0 etc. 
  300. cdFeatures                 ds.w    1                ; offset: $2 (2)        ;  Flags field for features and transport type of this CD-ROM 
  301. sizeof                     EQU *                    ; size:   $4 (4)
  302.                         ENDR
  303.  
  304. cdFeatureFlagsMask                EQU        $FFFC                ; The Flags are in the first 14 bits of the cdFeatures field 
  305. cdTransportMask                    EQU        $0003                ; The transport type is in the last 2 bits of the cdFeatures field 
  306.  
  307. ;  Flags for CD Features field 
  308.  
  309. cdMute                            EQU        0                    ; The following flags have the same bit number 
  310. cdLeftToChannel                    EQU        1                    ; as the Audio Mode they represent.  Don't change 
  311. cdRightToChannel                EQU        2                    ; them without changing dControl.c 
  312. cdLeftPlusRight                    EQU        3                    ; Reserve some space for new audio mixing features (4-7) 
  313. cdSCSI_2                        EQU        8                    ; Supports SCSI2 CD Command Set 
  314. cdStereoVolume                    EQU        9                    ; Can support two different volumes (1 on each channel) 
  315. cdDisconnect                    EQU        10                    ; Drive supports disconnect/reconnect 
  316. cdWriteOnce                        EQU        11                    ; Drive is a write/once (CD-R?) type drive 
  317. cdMute_Mask                        EQU        $01
  318. cdLeftToChannel_Mask            EQU        $02
  319. cdRightToChannel_Mask            EQU        $04
  320. cdLeftPlusRight_Mask            EQU        $08
  321. cdSCSI_2_Mask                    EQU        $0100
  322. cdStereoVolume_Mask                EQU        $0200
  323. cdDisconnect_Mask                EQU        $0400
  324. cdWriteOnce_Mask                EQU        $0800
  325. ;  Transport types 
  326.  
  327. cdCaddy                            EQU        0                    ; CD_SC,CD_SC_PLUS,CD-300 etc. 
  328. cdTray                            EQU        1                    ; CD_300_PLUS etc. 
  329. cdLid                            EQU        2                    ; Power CD - eg no eject mechanism 
  330. ;  the following are used by PC Exchange (and Apple DOS/PC Compatibility Card)
  331.  
  332. ;  Control Codes
  333.  
  334. kRegisterPartition                EQU        50                    ; PCX needs a new Drive (for a non-macintosh partition found on the disk)
  335. OLD_REGISTER_PARTITION            EQU        301                    ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  336. THE_DRIVE                        EQU        0                    ; DrvQElPtr for the partition to register
  337. THE_PHYS_START                    EQU        1                    ; The start of the partition in logical blocks
  338. THE_PHYS_SIZE                    EQU        2                    ; The size of the partition in logical blocks
  339. kGetADrive                        EQU        51                    ; control call to ask the driver to create a drive
  340. OLD_GET_A_DRIVE                    EQU        302                    ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  341. THE_VAR_QUEL                    EQU        0                    ; a VAR parameter for the returned DrvQElPtr
  342. kProhibitMounting                EQU        52                    ; Dont allow mounting of the following drives
  343. kOldProhibitMounting            EQU        2100                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  344. kProhibitDevice                    EQU        0                    ; CS Param 0 and 1 (partInfoRecPtr)
  345. kIsContainerMounted                EQU        53
  346. kOldIsContainerMounted            EQU        2201                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card            
  347. kContainerVRef                    EQU        0                    ; CS Param 0 and 1 (VRefNum)
  348. kContainerParID                    EQU        1                    ; CS Param 2 and 3 (Parent ID)
  349. kContainerName                    EQU        2                    ; CS Param 4 and 5 (File Name)
  350. kContainerResponse                EQU        3                    ; CS Param 6 and 7 (VAR pointer to short result)
  351. kMountVolumeImg                    EQU        54
  352. OLD_MOUNT_VOLUME_IMG            EQU        2000
  353. MV_HOST_VREFNUM                    EQU        0
  354. MV_HOST_PAR_ID                    EQU        1
  355. MV_HOST_NAME                    EQU        2
  356. MV_REQ_PERM                        EQU        3
  357. ;  Status Codes
  358.  
  359.  
  360. kGetPartitionStatus                EQU        50                    ; what is the status of this partition?
  361. kOldGetPartitionStatus            EQU        2200                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  362. kDeviceToQuery                    EQU        0                    ; CS Param 0 and 1 (partInfoRecPtr)
  363. kDeviceResponse                    EQU        1                    ; CS Param 2 and 3 (VAR pointer to short result)
  364. kGetPartInfo                    EQU        51                    ; Get a partition info record based on the provided vrefnum
  365. kOldGetPartInfo                    EQU        2300                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  366. kPartInfoResponse                EQU        0                    ; var parameter (pointer to partInfoRec) CSParam [0-1]
  367. kGetContainerAlias                EQU        52                    ; Get the alias that describes the file this drive was mounted from.
  368. kOldGetContainerAlias            EQU        2400                ; left in for compatibility with shipping Apple DOS/PC Compatibility Card
  369. kGetAliasResponse                EQU        0                    ;    var parameter (pointer to a Handle) CSParam [0-1]
  370. ;  the result codes to come from the driver interface 
  371.  
  372.  
  373. DRIVER_NOT_INSTALLED            EQU        -1
  374. DRIVER_BUSY                        EQU        -2
  375. CANT_MOUNT_WITHIN_THIS_FS        EQU        -3                    ; can only mount container within residing on HFS volume
  376. VOLUME_ALREADY_MOUNTED            EQU        -4                    ; Already Mounted
  377. ;  requisite structures for PCX control and status calls
  378.  
  379.  
  380. kMaxProhibted                    EQU        2                    ; the max number of volumes the PC can possibly have mounted
  381. ;  GestaltSelector for Finding Driver information
  382.  
  383.  
  384. kGetDriverInfo                    EQU        'vdrc'
  385.  
  386. VerifyCmd                        EQU        5
  387. FormatCmd                        EQU        6
  388. EjectCmd                        EQU        7
  389. ;  Partition information passed back and forth between PCX and the driver
  390. partInfoRec                RECORD 0
  391. SCSIID                     ds        DeviceIdent        ; offset: $0 (0)        ;  DeviceIdent for the device
  392. physPartitionLoc         ds.l    1                ; offset: $4 (4)        ;  physical block number of beginning of partition
  393. partitionNumber             ds.l    1                ; offset: $8 (8)        ;  the partition number of this partition
  394. sizeof                     EQU *                    ; size:   $C (12)
  395.                         ENDR
  396. ; typedef struct partInfoRec *            partInfoRecPtr
  397.  
  398. vPartInfoRec            RECORD 0
  399. VPRTVers                 ds.b    1                ; offset: $0 (0)        ;  Virtual partition version number
  400. VPRTType                 ds.b    1                ; offset: $1 (1)        ;  virtual partition type (DOS, HFS, etc)
  401. drvrRefNum                 ds.w    1                ; offset: $2 (2)        ;  Driver Reference number of partition driver
  402. sizeof                     EQU *                    ; size:   $4 (4)
  403.                         ENDR
  404. ; typedef struct vPartInfoRec *            vPartInfoRecPtr
  405.  
  406. ;  Information related to DOS partitions
  407.  
  408. kDOSSigLow                        EQU        $01FE                ; offset into boot block for DOS signature
  409. kDOSSigHi                        EQU        $01FF                ; offset into boot block for DOS signature
  410. kDOSSigValLo                    EQU        $55                    ; DOS signature value in low byte
  411. kDOSSigValHi                    EQU        $AA                    ; DOS signature value in high byte
  412.  
  413.  
  414.     ENDIF ; __DRIVERGESTALT__ 
  415.  
  416.